//
//  main.m
//  XXDelegate
//
//  Created by h92 on 14/12/12.
//  Copyright (c) 2014年 李腾飞. All rights reserved.
//


// 实现的代理模式——原理是老板招工谈待遇 


#import <Foundation/Foundation.h>
#import "Boss.h"
#import "Staff.h"
#import "maker.h"


int main(int argc, const char * argv[]) {
    @autoreleasepool {
        // insert code here...
        NSLog(@"Hello, World!");
        
        //programer 来应聘
        
        Boss *zhuang=[[Boss alloc]init];
        zhuang.delegate=[[Staff alloc]init];
        
        [zhuang daiyu];
        
        Boss *Dateing2=[[Boss alloc]init];
        Dateing2.delegate=[[maker alloc]init];
        
        [Dateing2 daiyu];
        [Dateing2 daiyu];
        [Dateing2 daiyu];
        NSLog(@"1");
        
        

    }
    return 0;
}
